package fun.cyhgraph.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import fun.cyhgraph.model.dto.*;
import fun.cyhgraph.model.entity.User;
import fun.cyhgraph.model.vo.UserLoginVO;
import fun.cyhgraph.result.Result;
import jakarta.servlet.http.HttpServletRequest;


public interface UserService extends IService<User> {
    Result<Object> wxLogin(UserLoginWechatDTO userLoginWechatDTO , HttpServletRequest request);

    User getUser(Integer id);

    void update(UserDTO userDTO);

    void verifyAdmin(UserRegisterForAdminDTO userRegisterDTO);
    void verifyMerchant(RegisterForMerchantDTO userRegisterDTO);
    void verifyRider(UserRegisterForAdminDTO userRegisterDTO);

    UserLoginVO userLogin(String name, String password, HttpServletRequest request);
    UserLoginVO getLoginUserVO(User user);

    boolean userLogout(HttpServletRequest request);

    User getLoginUser(HttpServletRequest request);
    User getLoginUser(HttpServletRequest request , String message);

    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    Result<Object> wxLoginForRider(UserLoginWechatDTO userLoginWechatDTO);

    Result<Object> wxLoginForMerchant(UserLoginWechatDTO userLoginWechatDTO);
}
